package com.filldream.fastboot.web.controller.common;


import com.filldream.fastboot.base.entity.BaseParam;
import com.filldream.fastboot.base.request.common.baseParam.BaseParamListSTO;
import com.filldream.fastboot.common.entity.R;
import com.filldream.fastboot.core.manager.BaseParamManager;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import java.util.List;

@RestController
@RequestMapping("/common/baseParam")
@Api(tags = "基础参数")
public class BaseParamController {


    @ApiOperation(value = "获取基本参数列表")
    @PostMapping("/getListByCode")
    public R<List<BaseParam>> getByCode(@RequestBody BaseParamListSTO baseParamListSTO){
        List<BaseParam> list = BaseParamManager.getListByCode(baseParamListSTO);
        return list.isEmpty() ? R.empty() : R.successd(list);
    }


}
